<link rel="stylesheet" href="http://www.12301.cc/css/common/reset_style.css"/>
<link rel="stylesheet" href="http://www.12301.cc/tpl/ui/common/ui_common.css"/>
<link rel="stylesheet" href="http://www.12301.cc/tpl/pft_resource/css/style.css"/>
<iframe name="imgUploadForm" src="" width="0" height="0" style="display:none" frameborder="0"></iframe>
<form id="submitForm" action="call/upload_api.php" method="post" target="imgUploadForm" enctype="multipart/form-data">
    <input name="action" value="SAVE_RESOURCE" type="hidden"/>
    <input id="resourceidHidInp" name="update_id" value="<?=$id?>" type="hidden"/>
    <input id="applydidHidInp" name="apply_did" value="<?=$apply_did?>" type="hidden"/>
    <input id="imgpathGrpHidInp" value="<?=$imgpathGrp?>" type="hidden"/>
	<div id="mainContainer" class="resource_box">
		<div style="padding-left:30px;" class="box_top setpadding">添加资源</div>
		<div class="post_box setpadding">
			<ul>
				<li class="list">
                    <span class="post_title setcolor_d">资源名称：</span>
                    <input class="setinput ui-radius ui-shadow" value="<?=$title?>" name="title" type="text"/>
                    <span class="setcolor_f set_txt"><em class="setTip">*</em>必填</span>
                </li>
				<li id="ptypeSelect" class="list setheight">
					<span class="post_title setcolor_d">类型：</span>
					<div class="province ui-radius">
                        <input id="ptype_hidInp" name="ptype" type="hidden" value="<?=$p_type?>"/>
						<span class="pro_txt"></span>
						<a href="javascript:void(0)" style="display:block" class="setbg"><span class="triangle"></span></a>
					</div>
					<ul class="pro_list"></ul>
				</li>
				<li id="levelSelect" class="list setheight">
					<span class="post_title setcolor_d">级别：</span>
					<div class="province ui-radius">
                        <input id="level_hidInp" name="jtype" value="<?=$jtype?>" type="hidden"/>
						<span class="pro_txt"></span>
						<a href="javascript:void(0)" style="display:block" class="setbg"><span class="triangle"></span></a>
					</div>
                    <span class="setcolor_f set_txt"><em class="setTip">*</em>必填</span>
					<ul class="pro_list"></ul>
				</li>
                <li class="list">
                    <span class="post_title setcolor_d">资源方：</span>
                    <input id="resorInp" class="setinput ui-radius ui-shadow" value="<?=$apply_did?>" name="" type="text"/>
                    
                    <span id="resorLoading" class="resorLoading"><i class="iconfont loading">&#xe644;</i></span>
                </li>
				<li class="set_position set_height">
					<span class="post_title setcolor_d">地址：</span>
					<div class="addressbox">
						<div id="area">
                            <input value="<?=$area?>" type="hidden"/>
                            <select name="d_province" id="d_province" class="pSelect d_province"></select>
                            <select name="d_city" id="d_city" class="pSelect d_city"></select>
						</div>
					</div>
                    <span class="setcolor_f set_txt"><em class="setTip">*</em>必填</span>
					<input class="setinput input_address ui-radius ui-shadow" name="address" value="<?=$address?>" type="text"/>
                    <span class="setcolor_f set_txt addressTip"><em class="setTip">*</em>必填</span>
				</li>
                <li class="list lnglatLine">
                    <span class="post_title setcolor_d">经纬度：</span>
                    <input name="lng_lat_pos" value="<?=$lng_lat_pos?>" class="lnglatInp setinput ui-radius ui-shadow" type="text" style="width:288px"/>
                    <span class="rt">
                        <a class="btn ui-btn ui-radius" target="_blank" href="http://api.map.baidu.com/lbsapi/getpoint/index.html">查询经纬度</a>
                        
                    </span>
                    <span class="setcolor_f set_txt"><em class="setTip">*</em>必填</span>
                    <p class="tipMsg">请在新打开的窗口中获取经纬度后，复制进来</p>
                </li>
                <li class="list">
                    <span class="post_title setcolor_d">联系电话：</span>
                    <input name="tel" value="<?=$tel?>" class="setinput ui-radius ui-shadow" type="text"/>
<!--                    <span class="setcolor_f set_txt"><em class="setTip">*</em>必填</span>-->
                    <p class="tipMsg">手机或固话（固话格式：区号-电话号码）</p>
                </li>
                <li class="list">
                    <span class="post_title setcolor_d">开放时间：</span>
                    <input name="runtime" value="<?=$runtime?>" class="setinput ui-radius ui-shadow" type="text"/>
<!--                    <span class="setcolor_f set_txt"><em class="setTip">*</em>必填</span>-->
                </li>
				<li class="list">
					<span class="post_title setcolor_d">主题：</span>
					<input id="themeInp" name="topic" value="<?=$topic?>" class="setinput themeInp ui-radius ui-shadow" readonly="true" type="text"/>
                    <a id="openThemeDialogBtn" class="themeSelectBtn" href="javascript:void(0)"><i class="iconfont">&#xe696;</i></a>
<!--                    <span class="setcolor_f set_txt"><em class="setTip">*</em>必填</span>-->
				</li>
				<!--	<div class="setbox">
						<div class="theme_txt"></div>
						<a class="btn_base btn_choose" href="##">选择</a>
					</div>
				</li>-->
				<li class="list" style="width:100%; overflow:hidden">
					<span style="float:left; width:95px;" class="post_title setcolor_d">预览图：</span>
					<div id="uploadImgWrap" class="uploadImgWrap">
                        <ul id="uploadImgUl" class="uploadImgUl"></ul>
                        <input name="callback" value="ImgUploador.complete" type="hidden"/>
                        <input style="width:215px" type="text" name="img_upload_file_input" class="file_name_inp formInp" id="file_name_inp"/>
                        <a id="browerFileBtnWrap" class="upBtn browerFileBtnWrap" href="javascript:void(0)">
                            <i class="iconfont">&#xe692;</i><span class="t">选择图片</span>
                            <input type="file" name="img_upload_file_input" class="upBtn browerFileBtn" id="browerFileBtn"/>
                        </a>
                        <button type="submit" class="upBtn uploadImgBtn" id="uploadImgBtn"><i class="iconfont">&#xe659;</i><span class="t">上传</span></button>
                        <p class="uploadTip">点击上传小于1M的jpg或gif格式图片，建议图片尺寸600px * 600px</p>
					</div>
                    <span class="setcolor_f set_txt"><em class="setTip">*</em>请至少传一张</span>
				</li>

                <li class="list">
                    <span class="post_title setcolor_d">预订须知：</span>
                    <div class="setbox_base">
                        <textarea name="jqts" class="textarea_base ui-radius ui-shadow"><?=$jqts?></textarea>
                    </div>
                </li>
				<li class="list">
					<span class="post_title setcolor_d">交通指南：</span>
					<div class="setbox_base">
						<textarea name="jtzn" class="textarea_base ui-radius ui-shadow"><?=$jtzn?></textarea>
					</div>
				</li>
                <li class="list">
                    <span class="post_title setcolor_d">产品介绍：</span>
                    <div class="setbox_base">
                        <div style="overflow:hidden; height:250px" id="richContent" class="txtbox"><?=htmlspecialchars_decode($bhjq)?></div>
                        <a id="editDetail" class="btn_base btn_edit" href="##">编辑</a>
                    </div>
                </li>
                <li class="list">
                    <?php if(!empty($_GET["debug"])): ?>
                        <span style="width:92px" class="post_title setcolor_d">同行竞争：</span>
                        <input style="width:396px" type="text" name="competitor" value="<?=$competitor?>" id="" class="setinput ui-shadow ui-radius"/>
                        <span style="color:#a3a3a3" class="tip">多个竞争对手用“，”分隔</span>
                    <?php else: ?>
                        <span style="width:92px" class="post_title setcolor_d">同行竞争：</span>
                        <select name="competitor" id="competitorSelect">
                            <?php
                                $competitorArr = array(
                                    "无","票工厂","中景信（海航）","联动票务","美景天下","北京旅游网","票务世界","中票盟",
                                    "景旅通","票速通","聚赢智业","旅游圈","票管家","智游宝","贝竹",
                                    "大家游","迅诺票务","江河行","智旅天下(同程网)","联合旅业","天时同城","三亚云端",
                                    "酷秀网","自我游（乐乐酷）","畅游通（鼎游）","芝麻游（任我游）","掌途","游付通","好哇",
                                    "驴小宝（旅管家）","广西天桂","角马旅游","北京中成科信","苏州环企","游乐宝旅业通","八爪鱼",
                                    "旅游百事通","欢途","博客","旅景","旅务通","计调通","天下门票（天客）","聚游网"
                                );
                                foreach($competitorArr as$key=> $item){
                                    $select = $key==$competitor ? "selected" : "";
                                     echo '<option '.$select.' value="'.$key.'" '.$select.'>'.$item.'</option>';
                                }
                            ?>
                        </select>
                    <?php endif; ?>
                </li>
                <li class="list">
                <?php if(!empty($_GET["debug"])): ?>
                <?php else: ?>
                    <span style="width:92px" class="post_title setcolor_d">票务系统：</span>
                    <select name="ticket_system" id="piaobisSelect">
                        <?php
                        $piaobisArr = array(
                            "无","福建九天达","浙江深大","上海大漠","深圳鼎游"
                        );
                        foreach($piaobisArr as$key=> $item){
                            $select = $key==$ticket_system ? "selected" : "";
                            echo '<option value="'.$key.'" '.$select.'>'.$item.'</option>';
                        }
                        ?>
                    </select>
                <?php endif; ?>
                </li>
                <li class="list">
                    <?php if(!empty($_GET["debug"])): ?>
                    <?php else: ?>
                        <span class="post_title setcolor_d">资源终端：</span>
                        <input id="" class="setinput ui-radius ui-shadow" value="<?=$terminal?>" name="terminal" type="text"/>
                    <?php endif; ?>
                </li>
			</ul>
			<a href="javascript:void(0)" id="submitBtn" class="btn_base btn_submit">提交</a>
			<a href="pft_resource.html?m=index" id="gobackListBtn" class="btn_base gobackListBtn">返回资源列表</a>
		</div>
	</div>
<div id="editorPopBox" class="editbox ui-pop">
    <div class="edit_a">
        <textarea id="detailInfo" name="bhjq" style="height:500px;" title="请输入"><?=htmlspecialchars_decode($bhjq)?></textarea>
    </div>
    <div class="btnbox_a">
        <a href="javascript:void(0)" class="btn_basea btn_cancelc">取消</a>
        <a href="javascript:void(0)" id="btnSaveContent" class="btn_basea btn_surec">确定</a>
    </div>
</div>
</form>
<div class="bgbox">	</div>
<div id="themePopBox" class="theme_select ui-pop">
    <div class="theme_top">
        <p>选择主题</p>
        <em class="close_btn">&#10005;</em>
    </div>
    <div class="selectbox">
        <ul class="selectlist"></ul>
        <div class="createThemeBox">
            <input style="width:320px;" type="text" name="" id="newThemeInp" class="ui-textInp ui-radius ui-shadow newThemeInp"/>
            <a style="color:#fff" id="createThemeBtn" class="createThemeBtn ui-btn radius" href="javascript:void(0)">新建</a>
        </div>
    </div>
    <div class="btnbox_a">
        <button class="btn_basea btn_cancela">取消</button>
        <button class="btn_basea btn_surea">确定</button>
    </div>
</div>
<!--弹窗选择-->
<div class="peer_select">
    <div class="theme_top">
        <p>添加同行竞争</p>
        <em class="close_btn">&#10005;</em>
    </div>
    <div class="selectbox">
        <ul class="peerlist">
        </ul>
        <div class="custombox">
            <span>自定义</span>
            <input class="setinput input_add" type="text" />
            <button class="btn_base btn_add">添加</button>
        </div>
    </div>
    <div class="btnbox_a">
        <button class="btn_basea btn_cancela">取消</button>
        <button class="btn_basea btn_sureb">确定</button>
    </div>
</div>



<script id="formSubmitSuccessDialogTpl" type="text/template">
    <div class="submitSuccessDialogCon">
        <p class="st"><i class="iconfont">&#xe62c;</i><span class="t">添加成功，您可：</span></p>
        <div class="btnGroup">
            <a class="btn goon ui-btn radius" href="pft_resource.html?m=add">继续添加</a>
            <a class="btn outto ui-btn radius" href="pft_resource.html?m=index">跳转到列表</a>
        </div>
    </div>
</script>
<script type="text/javascript" src="http://wx.12301.cc/public/js/build/common.min.js"></script>
<?php include("tpl/dialog/dialog.html")?>


<div style="display:none" id="resorPage" class="resorPage">
    <ul id="resorUl" class="resorUl"></ul>
</div>


<script type="text/javascript" charset="utf-8" src="http://www.12301.cc/ue/ueditor_config_mini.js"></script>
<script type="text/javascript" src="http://www.12301.cc/ue/ueditor.all.min.js"></script>
<!--<script type="text/javascript" src="http://www.12301.cc/tpl/pft_resource/js/pb.js"></script>-->
<!--<script src="http://www.12301.cc/js/getaress.js" type="text/javascript"></script>-->
<!--<script type="text/javascript" src="http://www.12301.cc/js/area.js"></script>-->
<!--<script type="text/javascript" src="http://www.12301.cc/js/area_complete.js"></script>-->
<script type="text/javascript" src="http://www.12301.cc/tpl/pft_resource/js/theme.js"></script>
<script type="text/javascript" src="http://www.12301.cc/tpl/pft_resource/js/editor.js"></script>
<script type="text/javascript" src="http://www.12301.cc/tpl/pft_resource/js/imgupload.js"></script>
<script type="text/javascript" src="http://www.12301.cc/tpl/pft_resource/js/ptype_level_switch.js"></script>
<script type="text/javascript" src="http://www.12301.cc/tpl/pft_resource/js/main.js"></script>
